import App from './App'
import Vue from 'vue'
import store from '@/store/index.js';
import uView from "@/uni_modules/uview-ui/index.js";
import {
	navTo,
	showToast,
	showLoading,
	uploadFile
} from '@/utils/util.js';
import {
	shareToFriend,
	shareToTimeline
} from '@/utils/share.js'
import share from '@/mixins/share.js';

import './uni.promisify.adaptor'
import {
	STATIC_ROOT
} from './config/request';

Vue.config.productionTip = false
Vue.prototype.$navTo = navTo
Vue.prototype.$showToast = showToast
Vue.prototype.$showLoading = showLoading
Vue.prototype.$shareToFriend = shareToFriend
Vue.prototype.$shareToTimeline = shareToTimeline
Vue.prototype.$uploadFile = uploadFile
Vue.prototype.$staticRoot = STATIC_ROOT
Vue.mixin(share)

// 载入uView库
Vue.use(uView)

// 修改uView默认单位为 rpx
uni.$u.config.unit = 'rpx';

App.mpType = 'app'

const app = new Vue({
	...App,
	store,
})

app.$mount()